Apple IIc: Setting serial port 2's firmware from BASIC (1 of 2)


If DOS or ProDOS is in RAM, you can access the firmware of serial port 2 from
BASIC using the list of command codes below.
 
  --To change a firmware setting when the port is in terminal mode, issue a
    CTRL-D (hex 04), IN#2, the command character CTRL-A, and the command code.
 
  --To change a firmware setting when the port is in non-terminal or local
    mode, issue a CTRL-D (hex 04), IN#2 or PR#2, the command character CTRL-A,
    and the command code.
 
  --To change the firmware setting without DOS or ProDOS, leave CTRL-D out of
    the string and issue the IN#2 or PR#2, command character, and code.
 
As soon as you issue the command character, the serial port firmware displays a
flashing question mark cursor to indicate that it's awaiting a command code. If
you press RETURN, you get the current video cursor again. You do not have to
press RETURN after command codes.
 
Subsequent input and output are routed to the modem (or other communications
device) connected to serial port 2 until the next IN# commands that the input
be routed to another port. You can therefore issue the CTRL-D and IN#2 and then
a string of command codes, each beginning with the command character CTRL-A, to
change more than one setting of the port firmware.
 
We recommended two substitutes to the command character CTRL-A: CTRL-V and
CTRL-W. To make the substitution, issue the current command character and
follow it with the substitute command character, e.g. CTRL-A CTRL-V.
 
For example, to set the port and startup AppleWorks:
 
  1. Write a program to set the Apple IIc port and end the program with the
     line:
 
           50 D$=CHR$(4)
          100 PRINT D$;"-APLWORKS": REM Launch AppleWorks
 
  2. Save the program as STARTUP on the AppleWorks startup disk.
 
  3. Rename the file /APPLEWORKS/APLWORKS.SYSTEM as /APPLEWORKS/APLWORKS to
     match the named file in line 100 in step 1 above.
 
  4. Copy the file BASIC.SYSTEM to the AppleWorks startup disk.
 
  5. Boot the AppleWorks startup disk. STARTUP will set the port and then pass
     control to AppleWorks.